<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <!--{include file='comm/header.tpl'}-->
    <title>文章列表</title>
</head>
<body>

<div class="container">

    
        <div class="comm_content">
            <div class="search-box">
                <div style="position:relative">
                    <form class="form-inline" id="search_form" onsubmit="return false;">
                        <table>
                            <tbody>
                            <tr>
                                <td>
                                    <span>
                                        任务名称：<select class="form-control w150" id="name" name="name" size="1" style="width:160px;">
                                            <option value="">请选择</option>
                                            <!--{foreach from=$name item=line}-->
                                            <option value="<!--{$line->name}-->"><!--{$line->name}--></option>
                                            <!--{/foreach}-->
                                        </select>
                                    </span>

                                     <span>
                                        创建日期：
                                        <input class="form-control w100" id="startDate" name="startDate" value="" readonly="readonly" type="text" />
                                        ～
                                        <input class="form-control w100" id="endDate" name="endDate" value="" readonly="readonly" type="text" />
                                        <button type="button" class="btn btn-default btn-sm" onclick="taskLog.timeClear()">清 空</button>
                                    </span>

                                    <span><button type="button" class="btn btn-primary" onclick="taskLog.search();" />查询</button></span>
                                    <span><button type="button" class="btn btn-warning" onclick="taskLog.clearUp();" />重置</button></span>

                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </form>
                </div>
            </div>

            <table id="flex" style="display:none"></table>

        </div>


</div>

<script type="text/javascript">

    $("#flex").flexigrid({
        url:"/invokingAjax-backend/system/taskLog.ajax?operFlg=1",
        dataType: "json",
        colModel : [

            {display: "日志编号", name : "task_id", width : 100},
            {display: "创建人", width : 200},
            {display: "错误级别", width : 100},
            {display: "创建时间", width : 150},
            {display: "任务名称", width : 260},
            {display: "日志错误信息", width : 300}
        ],

        sortname: "task_id",
        sortorder: "desc",
        usepager: true,
        rp: 10,
        useRp: true,
        showTableToggleBtn: true,
        onSubmit: function() {
            var dt = $('#search_form').serializeArray();
            $("#flex").flexOptions({params: dt});
            return true;
        }
    });

    var taskLog = {

        //搜索
        search: function() {
            var dt = $('#search_form').serializeArray();
            $("#flex").flexOptions({params: dt}).flexReload();

        },

        timeClear: function() {
            $('#startDate').val('');
            $('#endDate').val('');
        },

        //重置
        clearUp:function(){
            $("#name").val('');
            $("#startDate").val('');
            $("#endDate").val('');

            var dt = $('#search_form').serializeArray();
            $("#flex").flexOptions({params: dt}).flexReload();
        }

    };

    $('#startDate').datepicker();
    $('#endDate').datepicker();
</script>

</body>

</html>